<?php
// prijs
// winkel
// artiest
// winkel
// positie lengte/breedte graad
// date

$gebruikersnaam = "root";
$paswoord = "";
$database = "iphone";
 
$link2 = mysql_connect("localhost", $gebruikersnaam, $paswoord) or die("Kan niet verbinden: " . mysql_error());
$link1 = mysql_select_db( $database ) or die("Kan niet verbinden: " . mysql_error());

function db_addItem($artist, $album, $price, $store, $lat, $long )
{
	$userid = 56765; // could be changed into session variable when login is available
	$query = 	"INSERT INTO items(userid, artist, album, latitude, longtitude, store, price) 
				VALUES ($userid, '$artist', '$album', $lat, $long, '$store', $price ) ";
	$result = mysql_query($query);
	if (!$result) {
		die( 'Invalid query: ' . mysql_error());
	}
}

?>
